<%@page contentType="text/html; charset=utf-8" language="java"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>无标题文档</title>
		<style type="text/css">
		<!--
		body {
			background-image: url();
			margin-left: 0px;
			margin-top: 0px;
			margin-right: 0px;
			margin-bottom: 0px;
		}
		body,td,th {
			font-size: 12px;
		}
		-->
		</style>
		<link href="css/css.css" rel="stylesheet" type="text/css">

		<style type="text/css">
<!--
.style4 {color: #FF0000}
.style6 {
	font-size: 16px;
	color: #66CCFF;
	font-weight: bold;
}
-->
        </style>
        <script type="text/javascript">
        	function onOk(){
        		var HotelCode="";
        		var qxkwmc="";
        		var n = document.getElementsByName("qxkwlb").length;
        		if(n==1){
	      			if (document.form1.qxkwlb.checked==true ){
	       				HotelCode = document.form1.qxkwlb.value;
	       				qxkwmc=eval("document.form1.qxkwmc0").value;
	       			}
        		}else{
	        		for(var i=0;i<n;i++){
	      				if (document.form1.qxkwlb[i].checked==true ){
	       					HotelCode = document.form1.qxkwlb[i].value;
	       					qxkwmc=eval("document.form1.qxkwmc"+i).value;
	       				}
	       			}
       			}
       			if(HotelCode==""){
       				alert("请选择专利类别，然后点击确定！");
       				return false;
       			}
       			if(window.opener){
       			window.opener.document.form1.logininfo_qxkw.value=HotelCode;
       			window.opener.document.form1.logininfo_qxkwmc.value=qxkwmc;
       			}
       			window.close();
        	}
        	//下一步按钮
        	function onOk2(){
        		var HotelCode="";
        		for(var i =0;i<document.form1.qxkwlb.length;i++){
      				if (document.form1.qxkwlb[i].checked== true ){
       					HotelCode = document.form1.qxkwlb[i].value;
       				}
       			}
       			if(HotelCode==""){
       				alert("请选择推荐单位类别，然后点击下一步！");
       				return false;
       			}
        	}
        </script>
		<script src="js/common.js" type="text/javascript"> </script>
	</head>
	<body bgcolor="#FFFFFF">
		<form action="viewQxkwAdminList.action" method="post" name="form1">
		  <table width="100%" bgcolor="#FFFFFF" align="center"
				background="images/bg.gif">
				<tr>
				  <td>
						<table width="100%" border="0" bgcolor="#CCCCCC" cellpadding="2"
							cellspacing="1" align="center">
							<tr bgcolor="#CCECEC">
									<td width="8%" align="center">
										<strong>选择</strong>
									</td>
									<td width="85%" align="center">
										<strong>推荐单位名称</strong>
									</td>
							</tr>
							<s:hidden name="bs"></s:hidden>
							<s:iterator value="qxkwList" id="staticModel" status="st">
								<tr bgcolor="#FFFFFF">
									<td width="8%" align="center">
										<s:radio name="qxkwlb" list="#staticModel.id" theme="simple" listKey="#staticModel.id" listValue='""' label='""'/>
										<input type="hidden" name="qxkwmc<s:property value="#st.index"/>" value="<s:property value="%{getText(name)}"/>">
									</td>
									<td width="85%">
										<s:property value="name"/>
									</td>
								</tr>
							</s:iterator>
							<tr align="center" valign="middle" bgcolor="#FFFFFF">
								<td colspan="3">
									<s:set name="bs" value="#bs"></s:set>
									<s:if test="${bs!='A'}"><input name="button" class="btn1" type="button" id="button" value="上一步" onclick="history.go(-1)"></s:if>
									&nbsp;&nbsp;&nbsp;&nbsp;
									<s:if test="${bs=='B'}"><input name="button" type="button" class="btn1" id="button" value="确  定" onclick="onOk();"></s:if>
									<s:else><input name="button" type="submit" class="btn1" id="button" value="下一步" onclick="return onOk2();"></s:else>
								</td>
							</tr>
						</table>
				  </td>
				</tr>
				<tr>
					<td height="7"></td>
				</tr>
		  </table>
	</form>
	</body>
</html>
